//package com.example.r2022913.config;
//
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.CorsRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
///**
// * 全局跨域配置，遵从就近原则，filter和注解，取最近  */
//@Configuration
//public class CorsConfig1 implements WebMvcConfigurer {
//    @Override
//    public void addCorsMappings(CorsRegistry registry) {
//        registry.addMapping("/**")
//                .allowCredentials(true)
//                .allowedOrigins("sjcl.xihewh.com",
//                        "http://sjcl.xihewh.com",
//                        "https://sjcl.xihewh.com",
//                        "http://localhost:8078",
//                        "http://localhost:8082",
//                        "http://localhost:8086",
//                        "http://localhost:8080",
//                        "http://127.0.0.1:8078",
//                        "http://127.0.0.1:8080",
//                        "http://127.0.0.1:8082",
//                        "http://127.0.0.1:8086")
//                .allowedMethods("GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS")
//                .maxAge(3600)
//                .exposedHeaders()
//                .allowedHeaders("Authorization","Content-Type","X-Requested-With","accept","Origin","Access-Control-Request-Method","Access-Control-Request-Headers","Access-Control-Allow-Origin");
//    }
//}
//
